{% extends "base.html" %}
{% import "/sideview/macros.html" as sideview %}

{% block title %}当前访问{% endblock title %}
{% block subtitle %}当前访问{% endblock subtitle %}

{% block content %}
    <div id="current_connect">
        <ul>
        {% for login, member in logins %}
            <li>
                <span class="crt_num">{{ loop.index }}</span>
                <span class="crt_profile"><img src="{{ get_member_image(login.mb_id) }}" alt="profile_image"></span>
                <div class="crt_info">
                    <span class="crt_name">
                    {% if login.mb_id %}
                        <div>{{ sideview.get(request, login.mb_id, member.mb_nick, member.mb_email, member.mb_homepage)|safe }}</div>
                    {% else %}
                        {{ login.lo_ip }}
                    {% endif %}
                    </span>
                    <span class="crt_lct">
                    {% if request.state.is_super_admin %}
                        <a href="{{ login.lo_url }}">{{ login.lo_location }}</a>
                    {% else %}
                        {{ login.lo_location }}
                    {% endif %}
                    </span>
                </div>
            </li>
        {% else %}
            <li class="empty_li">没有当前访问.</li>
        {% endfor %}
        </ul>
    </div>
{% endblock content %}